# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-term-progressbar
pkgver=2.22
pkgrel=1
pkgdesc="Perl/CPAN Module Term::ProgressBar : Progress bar in just ASCII  using Term"
url="https://metacpan.org/release/Term-ProgressBar"
arch="noarch"
license="GPL"
depends="perl-class-methodmaker perl-term-readkey perl-capture-tiny perl-test-exception"
makedepends="perl-dev"
checkdepends="perl-test-warnings"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/MA/MANWAR/Term-ProgressBar-$pkgver.tar.gz"
builddir="$srcdir"/Term-ProgressBar-$pkgver

build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="4274eb837c4d7f978ede2fe6b2705284a43df58cdd2cd0e2a8b96a3b71ef78f60cdb622416ede994a0ea79f3a72efcbaa4cd5b47645918235c8bbed6f9e64ad9  Term-ProgressBar-2.22.tar.gz"
